<template>
    <section class="jumbotron">
      <h3 class="jumbotron-heading">Search Github Users</h3>
      <div>
        <input type="text" placeholder="enter the name you search" v-model="title"/>
        <button @click="clickTitle">Search</button>
      </div>
    </section>
</template>

<script>
  export default {
    name:'SeatchHeader',
    data(){
      return{
        title:''
      }
    },
    methods: {
      clickTitle(){
        if(this.title){
          this.$store.dispatch('Userseatch/seatch',this.title)
      this.title = ''
      }
      }
    }
  }
</script>

<style scoped>
  
</style>